# coding:utf-8
from marshmallow import fields

from ..extensions import ma
from .utils import EmptyStrValidator


class IMWelcomeSchema(ma.Schema):
    """
    created by chenhj at 2017/8/22

    """
    uid = fields.Int(required=True, error_messages={
        'required': '用户ID不合法'
    })
    msg = fields.Str(required=True, error_messages={
        'required': '消息内容不合法'
    }, validate=EmptyStrValidator(error='消息内容不合法'))

im_welcome_schema = IMWelcomeSchema()
